package com.longqin.wechat.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

/**
 * @Description: 响应统一结果
 * @param <T>
 * @Author longqin
 * 
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder(value={"code","msg","data"})
public class ResponseData<T> extends BaseResponse{

	private static final long serialVersionUID = 1L;

	private T data;
	
	private long total;

	public ResponseData(int code, String msg, T data, long total) {
		super(code,msg);
		this.data = data;
		this.total = total;
	}

	public ResponseData(int code, String msg, T data) {
		super(code,msg);
		this.data = data;
	}

	public ResponseData(int code, String msg) {
		super(code,msg);
	}

	public ResponseData() {
		super();
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public long getTotal() {
		return total;
	}

	public void setTotal(long total) {
		this.total = total;
	}

}